#ifndef _FILEOP_H_
#define _FILEOP_H_

#include <dlcom/cominc.hpp>

typedef os_fd_t(*OpenFileFunc)(const TCHAR *filepath, int flags, int mode);
typedef int(*CloseFileFunc)(os_fd_t fh);
typedef _off_t(*SeekFileFunc)(os_fd_t fh, _off_t offset, int whence);
typedef int(*ReadFileFunc)(os_fd_t fh, void *buf, size_t size);
typedef int(*WriteFileFunc)(os_fd_t fh, const void *buf, size_t size);
typedef os_int64(*fSizeFileFunc)(os_fd_t fh);

typedef struct TagFileImpl {
	OpenFileFunc	Open;
	CloseFileFunc	Close;
	SeekFileFunc	Seek;
	ReadFileFunc	Read;
	WriteFileFunc	Write;
	fSizeFileFunc	fSize;
}FileImpl;

void loadFileInstance(FileImpl* fileop);

#endif // ! _FILEOP_H_

